import {CHANGE_CONFIG_STATUS, ConfigTypes} from "./action";

export interface ConfigState {
    status: boolean;
}

const defaultState: ConfigState = {
    status: false
}

export default function configReducer(state = defaultState, action: ConfigTypes) {
    switch (action.type) {
        case CHANGE_CONFIG_STATUS:
            return {
                ...state,
                ...action.payload
            };
        default:
            return state;
    }
}
